package com.appkubes.fintech.restful.application.rent.request.order;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

/**
 * @Author: Rongjie
 * @Date: 2020/1/9 22:48
 * @Description:
 */
@Data
@ApiModel("租赁信息")
public class RentInfoVO {

    @ApiModelProperty("租赁总价")
    @NotBlank(message = "租赁总价不能为空")
    Integer rentAmount;

    @ApiModelProperty("信用额度")
    Integer creditAmount;

    @ApiModelProperty("补充押金")
    Integer creditIncreaseAmount;

    @ApiModelProperty("买断金额")
    @NotBlank(message = "买断金额不能为空")
    Integer buyOutAmount;

    @ApiModelProperty("首付金额")
    @NotBlank(message = "首付金额不能为空")
    Integer fistPayAmount;

    @ApiModelProperty("租赁类型")
    @NotBlank(message = "租赁类型不能为空")
    String rentType;

    @ApiModelProperty("租金利息")
    @NotBlank(message = "租金利息不能为空")
    BigDecimal interestRate;

    @ApiModelProperty("期限类型 1天2周3月")
    @NotBlank(message = "期限类型不能为空")
    Integer periodType;
    @ApiModelProperty("总期数")
    @NotBlank(message = "总期数不能为空")
    Integer periods;
    @ApiModelProperty("总时间长度")
    @NotBlank(message = "总时间长度不能为空")
    Integer periodLong;

    @ApiModelProperty("分期编码")
    @NotNull(message = "分期编码不能为空")
    @Pattern(regexp = "(WEEK1|WEEK2|WEEK3|WEEK4|WEEK5|WEEK6|WEEK7|WEEK8|WEEK9|WEEK10|WEEK11|WEEK12|WEEK13|WEEK14|WEEK15|WEEK16" +
            "|WEEK17|WEEK18|WEEK19|WEEK20|WEEK21|WEEK22|WEEK23|WEEK24|WEEK25|WEEK26|WEEK27|WEEK28|WEEK29|WEEK30|MONTH1|MONTH2|MONTH1" +
            "|MONTH2|MONTH3|MONTH4|MONTH5|MONTH6|YEAR1)", message = "分期编码错误")
    String periodsCode;
}
